package arch;

import java.net.URL;

import ks.client.UserContext;
import ks.client.lobby.Lobby;
import ks.framework.common.Message;

/**
 * Registers all client-side components to form the client architecture
 * and launches the client application.
 *
 * @author George Heineman
 */
public class ClientArchitecture {
	/**
	 * Launch client app.
	 * 
	 * @param args
	 * @throws Exception 
	 */
	public static void main(String[] args) throws Exception {
		// Determine the XML schema we are going to use
		Message.configure("ks.xsd", new URL("http://www.wpi.edu/~heineman/xml/ks.xsd"));

		// all action on this (default) local host. Should there be a need
		// to connect to a different host computer, then you would need 
		// to pass in command-line argument values from 'args' into the 
		// constructor of UserContext so the client knows to which server
		// to connect.
		
		UserContext context = new UserContext();  // by default, localhost
		Lobby lob = new Lobby (context);
		
		lob.setVisible(true);
		
		// running...
	}
}
